<template>
  <div>
    <to-search></to-search>
  <show-list :arr="arr"></show-list>
    
  </div>
</template>

<script>
import { reqlist } from "../../http/http";

export default {
  data() {
    return {
      // 1.初始值
      arr: []
    };
  },
  mounted() {
    reqlist({
      cateid: this.$route.query.id,
      type: 1
    }).then(res => {
      console.log(res);
      this.arr = res.data.list.goodData ? res.data.list.goodData : [];
    });
  }
};
</script>

<style scoped>
a {
  background: pink;
  margin: 10px;
  padding: 10px;
  border-radius: 10px;
  display: flex;
}

img {
  width: 100px;
  height: 100px;
}

a > div {
  flex: 1;
}
</style>